package com.mar.framecompress.util;

import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;

public class BufferOutputStream extends OutputStream {

	private final ByteBuffer underlyingBuffer;
	
	public BufferOutputStream( ByteBuffer buff ) {
		this.underlyingBuffer = buff;
	}
	
	@Override
	public void write(int b) throws IOException {
		underlyingBuffer.put( (byte)b );
	}

}
